package com.buercorp.wangyu.core1.ch12.threads;

/**
 * 匿名内部类简写 Runnable 接口
 * @author 忆白
 */
public class ThreadText1 {
    public static void main(String[] args) {
        Thread thread = new Thread(() ->{
            for (int i = 0; i < 5; i++) {
                System.out.println("子线程执行了" + i);
            }
        });
        thread.start();
        for (int i = 0; i < 5; i++) {
            System.out.println("主线程main" + i);
        }
    }
}
